<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../tpl/head.jsp"%>
<link rel="stylesheet" href="statics/css/searchform.css">
<link rel="stylesheet" href="statics/css/secondarytitle.css">
<link rel="stylesheet" href="statics/css/BasicData/product.css">
<style>
    .sknav>li>a{}
    .sknav>li>.layui-nav-child{
        z-index: 9999;
        background: white;
        top: 2em;}
    .sknav>li>.layui-nav-child a:hover{cursor: pointer}
    .layui-nav.sknav .layui-nav-item a{line-height: 2em;height: 2em;}
</style>
<div  class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header layui-bg-cyan">
            <span>产品</span>

            <div class="layui-btn-group Authority-Label" style="display:none;float: right;padding-right:57px;">
                <ul class="layui-nav sknav float-right" lay-filter="">
                    <li class="layui-nav-item">
                        <a href="javascript:;">垫片</a>
                        <dl class="layui-nav-child">
                            <dd ><a id="gasketTypeCodeSetting">垫片种类编码设置</a> </dd>
                            <dd ><a id="gasketTypeSetting">垫片种类设置</a> </dd>
                            <dd ><a id="spacerEarSettings">垫片耳朵设置</a> </dd>
                            <dd ><a id="gasketParameterSetting">垫片特殊参数设置</a> </dd>
                            <dd ><a id="gasketSizeSetting">垫片尺寸设置</a> </dd>
                            <dd ><a id="manuscriptCodeSetting">印刷稿件简码设置</a> </dd>
                            <dd ><a id="gasketSpecialNeedsSetting">特殊需求设置</a> </dd>
                        </dl>
                    </li>
                </ul>
                <ul class="layui-nav sknav float-right" lay-filter="">
                    <li class="layui-nav-item">
                        <a href="javascript:;">其它</a>
                        <dl class="layui-nav-child">
                            <dd ><a id="otherSpecificationSizeSetting">规格尺寸设置</a> </dd>
                            <dd ><a id="otherSpecialParametersSetting">特殊参数设置</a> </dd>
                            <dd ><a id="otherCategorySetting">品类设置</a> </dd>
                            <dd ><a id="otherCustomerNumberSetting">客户货号设置</a> </dd>
                            <dd ><a id="otherSpecialNeedsSetting">特殊需求设置</a> </dd>
                        </dl>
                    </li>
                </ul>
                <ul class="layui-nav sknav float-right" lay-filter="">
                    <li class="layui-nav-item">
                        <a href="javascript:;">选配件</a>
                        <dl class="layui-nav-child">
                            <dd ><a id="partsCategorySettings">种类设置</a> </dd>
                            <dd ><a id="partsMoldCategorySettings">模具类别设置</a> </dd>
                            <dd ><a id="partsFirstCategorySettings">品类设置</a> </dd>
                            <dd ><a id="partsSecondaryCategorySettings">规格设置</a> </dd>
                            <dd ><a id="partsThreeCategorySettings">材质设置</a> </dd>
                            <dd ><a id="partsCraftSettings">工艺设置</a> </dd>
                            <dd ><a id="partsColorOrderNumberSettings">颜色订货号设置</a> </dd>
                            <dd ><a id="partsPrivateMoldNumberSetting">私模订货号设置</a> </dd>
                            <dd ><a id="partsSpecialNeedsSetting">特殊需求设置</a> </dd>
                        </dl>
                    </li>
                </ul>
                <ul class="layui-nav sknav float-right" lay-filter="">
                    <li class="layui-nav-item">
                        <a href="javascript:;">包材</a>
                        <dl class="layui-nav-child">
                            <dd ><a id="categorySettings">种类设置</a> </dd>
                            <dd ><a id="moldCategorySettings">模具类别设置</a> </dd>
                            <dd ><a id="firstCategorySettings">品类设置</a> </dd>
                            <dd ><a id="secondaryCategorySettings">规格设置</a> </dd>
                            <dd ><a id="threeCategorySettings">材质设置</a> </dd>
                            <dd ><a id="craftSettings">工艺设置</a> </dd>
                            <dd ><a id="colorOrderNumberSettings">颜色订货号设置</a> </dd>
                            <dd ><a id="privateMoldNumberSetting">私模订货号设置</a> </dd>
                            <dd ><a id="specialNeedsSetting">特殊需求设置</a> </dd>
                        </dl>
                    </li>
                </ul>
                <button class="layui-btn layui-btn-sm layui-btn-normal " id="customscode">海关编码设置</button>
            </div>
            <div class="titleright" style="display: none" id="titlerightone">
                <button class="layui-btn layui-btn-sm" style="top: 5px;right: 10px;margin-right:1em;position: absolute;" lay-filter="statistics"
                        lay-dropdown="{showBy: 'hover',align:'left', menus: [
                        {txt: '产品创建日期及修改日期统计', event:'s1'},
                        {txt: '按供应商采购产品情况统计', event:'s2'},
                        {txt: '厂商产品排价', event:'s3'},
                        {txt: '产品采购Top', event:'s4'},
                        {txt: '产品未录入单价下采购单统计', event:'s5'},
                        ]}">
                    <span>统计</span>
                    <i class="layui-icon layui-icon-triangle-d" style="position: absolute;right: auto;"></i>
                </button>
            </div>

            <div class="titleright" style="display: none" id="titlerighttwo">
                <button class="layui-btn layui-btn-sm" style="top: 5px;right: 10px;margin-right:1em;position: absolute;" lay-filter="statistics"
                        lay-dropdown="{showBy: 'hover',align:'left', menus: [
                        {txt: '产品创建日期及修改日期统计', event:'s1'},
                        ]}">
                    <span>统计</span>
                    <i class="layui-icon layui-icon-triangle-d" style="position: absolute;right: auto;"></i>
                </button>
            </div>
            <div class="titleright" style="display: none" id="titlerighThree">
                <button class="layui-btn layui-btn-sm" style="top: 5px;right: 10px;margin-right:1em;position: absolute;" lay-filter="statistics"
                        lay-dropdown="{showBy: 'hover',align:'left', menus: [
                        {txt: '产品创建日期及修改日期统计', event:'s1'},
                         {txt: '厂商产品排价', event:'s3'},
                        ]}">
                    <span>统计</span>
                    <i class="layui-icon layui-icon-triangle-d" style="position: absolute;right: auto;"></i>
                </button>
            </div>
        </div>
        <div class="layui-card-body">
            <div class="layui-row">
                <div class="layui-col-xs3">
                    <table class="layui-table" id="producttree" lay-filter="producttree"></table>
                </div>
                <div class="layui-col-xs9">
                    <form class="layui-form" action="" lay-filter="editor-form" id="editor-form">
                        <div class="layui-form-item padding">
                            <div class="layui-inline">
                                <label class="layui-form-label">产品编码：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="code" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">中文名称：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="chinaName" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">规格编码：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="gecode" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">英文名称：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="englishName" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">规格说明：</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="ge" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">目录：</label>
                                <div class="layui-input-inline" >
                                    <div id="directory" class="xm-select-demo"></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">中文描述</label>
                                <div class="layui-input-inline">
                                    <input class="text layui-input" type="text"  name="chineseDesc" autocomplete="off" placeholder="">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">英文描述</label>
                                <div class="layui-input-inline">
                                    <input class="text layui-input" type="text"  name="englishDesc" autocomplete="off" placeholder="">
                                </div>
                            </div>
                            <button class="layui-btn layui-btn-sm layui-btn-submit" lay-submit="" lay-filter="form-search" style="margin-left: 10px">搜索</button>
                            <button type="reset" class="layui-btn layui-btn-sm layui-btn-submit">重置</button>
                        </div>
                    </form>
                    <table class="layui-table" id="productid" lay-filter="producttable"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<input id = "productttype" style="display: none;" value="公司文件"/>

<script type="text/html" id="imgTpl">
    <img src="{{d.img}}" alt="产品图片" style="max-width:70px;max-height: 28px;">
</script>

<script type="text/html" id="producttoolbar">
    {{#  if($('#productttype').val() != "回收箱" && $('#productttype').val() != "垃圾箱"){ }}
    {{# if(!isProductUpdateAndDeleteTab){ }}
        <button class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="newParts">垫片</button>
        <button class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="productNotParts">包材</button>
        <button class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="newuser">选配件</button>
    {{# } }}
    {{# if(!isProductUpdateAndDeleteTab || !isProductOtherTab){ }}
    <button class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="newOtherProduct">其它</button>
    {{# } }}


    {{#  }else{ }}
        <button class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="restorefile">恢复</button>
    {{#  } }}
    <button class="layui-btn layui-btn-sm" lay-event="uploadFile" id="uploadFile">上传文件</button>
    {{# if(!isProductUpdateAndDeleteTab){ }}
    <button class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="newProductAndParts">产品合并</button>
    <button class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="deluser">删除</button>
    <button class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="deactivate">停用</button>
    {{# } }}
</script>
<script type="text/html" id="producttreetoolbar">
    <div class="producttreetoolbardiv">
        <button class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="newuser"><i class="layui-icon layui-icon-addition"></i>添加</button>
        <%--<button class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="deluser"><i class="layui-icon layui-icon-delete"></i>删除</button>--%>
        <input type="text" name="filename" id="treename" autocomplete="off" class="layui-input">
        <a type="button" class="layui-btn layui-btn-sm layui-btn-normal" id="search">搜索</a>
    </div>
</script>
<script type="text/html" id="producttreeeditor">
    <%--types 0 为主目录隐藏添加删除--%>
<Rolue:operate operateID="product_treetable" roleID="product_treetable" mark="产品中心树">
    {{#  if(d.types != 0){ }}
        <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="editor">修改</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    {{#  } }}
</Rolue:operate>
</script>
<script type="text/html" id="producteditor">
    {{# if(!isProductUpdateAndDeleteTab){ }}
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="editor">修改</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    {{# } }}
</script>
<%@ include file="../tpl/foot.jsp"%>
<script src="statics/js/BasicData/product.js"></script>